#!/usr/bin/env bash
module=$1
profile=$2

case x$module in
    "xmall-admin"| "xmall-restful")
        case $profile in
		      test|demo|uat|yizu|prod)
			        git pull
 		          mvn -P$profile clean package tomcat7:redeploy -pl kylin-$module -DskipTests
        	    echo "deploy success!"
          	    exit
			    ;;
             *)
                ;;
        esac
	;;
    *)
    ;;
esac

echo "deploy [mall-admin | mall-restful]  [test | demo| yizu| prod]"
exit 1
